<script setup>
import Aside from "@/components/Aside.vue";
import Top from '@/components/Top.vue'
import {request} from "@/util/request.js";
import {ref} from "vue";
import {useUserStore} from "@/store/user.js";

const userStore = useUserStore()
const menus = ref([])
request.get('/menu/menus', {
    headers: {
        'Authorization': userStore.token
    }
}).then(res => {
    menus.value = res.data
})

</script>

<template>
    <el-container>
        <Aside :items="menus"/>
        <el-main>
            <div class="nav">
                <Top/>
            </div>
            <div class="content">
                <router-view/>
            </div>
        </el-main>
    </el-container>
</template>

<style>

.nav {
    height: 80px;
}

* {
    margin: 0;
    padding: 0;
}

.el-main {
    padding: 0;
    margin: 0;
}

.content {
    padding: 20px;
}
</style>